package vis.manage.sys;

import vis.core.common.security.AuthOnlyLogin;
import vis.core.domain.sys.SRS;
import com.mybatisflex.core.paginate.Page;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

/**
 * 系统消息
 */
@Slf4j
@RestController
@RequestMapping("/manage/system/msg")
public class SysMsgController {

    //用户消息
    @AuthOnlyLogin
    @PostMapping("/userPageData")
    public SRS<Page<Object>> userPageData() {
        Page<Object> page = new Page<>();
        return SRS.bySuccess(page);
    }

    //消息主体
    @PostMapping("/msgPageData")
    public SRS<Page<Object>> msgPageData() {
        Page<Object> page = new Page<>();
        return SRS.bySuccess(page);
    }

    //
    @PostMapping("/insert")
    public SRS<Object> insert() {
        return SRS.bySuccess();
    }

    //

    @PostMapping("/delete")
    public SRS<Object> delete(String ids) {
        return SRS.bySuccess();
    }

    //
    @PostMapping("/info")
    public SRS<Object> info(String id) {
        return SRS.bySuccess();
    }

    //未读消息
    @AuthOnlyLogin
    @PostMapping("/notReadMsgCount")
    public SRS<Object> notReadMsgCount() {
        return SRS.bySuccess(0);
    }

    //读取前几条未读消息
    @AuthOnlyLogin
    @PostMapping("/msgTopList")
    public SRS<Object> msgTopList(String type, int size) {
        return SRS.bySuccess(new ArrayList<>());
    }

    //全部已读
    @AuthOnlyLogin
    @PostMapping("/readAll")
    public SRS<Object> readAll() {
        return SRS.bySuccess();
    }

    //部分已读
    @AuthOnlyLogin
    @PostMapping("/readBatch")
    public SRS<Object> readBatch(String msgIds) {
        return SRS.bySuccess();
    }


}
